<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动联系</title>
    <style>
        div{
            background-color: black;
            width: 100%;
            height: 500px;
            margin-bottom: 5px;
            position: relative;
        }
        .box1{
            background-color: red;
            width: 150px;
            height: 150px;
            border:4px solid yellow;
            border-radius: 10px;
            position: absolute;
            left: 50%;
            top:50%;
            transform:translate(-50%, -50%);
        }
    </style>
</head>
<body>
    <div >
        <div class="box1"></div>
    </div>
    <div ><div class="box1"></div></div>
    <div ><div class="box1"></div></div>
    <div ><div class="box1"></div></div>
    <div ><div class="box1"></div></div>
</body>
</html>